package top.italks.webviewdemo.ui;

import android.net.Uri;
import android.util.Log;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import butterknife.BindView;
import butterknife.ButterKnife;
import top.italks.webviewdemo.R;

public class UrlSchemeActivity extends AppCompatActivity {

    @BindView(R.id.age)
    TextView age;
    @BindView(R.id.name)
    TextView name;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_url_scheme);
        ButterKnife.bind(this);

        Uri uri = getIntent().getData();
        if (uri != null) {
            age.setText(uri.getQueryParameter("age"));
            name.setText(uri.getQueryParameter("name"));
        }

    }
}
